package practice02;

/**
 * @author Administrator
 * @version V1.0
 * @ProjectName:IntelliJ IDEA
 * @PackageName: practice02
 * @ClassName: Rabbit
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @date 2019/12/8 13:59
 * @Copyright 大牛版板所有
 */
public class Rabbit extends Animal {
    private String color;

    public Rabbit() {
    }

    public Rabbit(String name, int age, String gender, String color) {
        super(name, age, gender);
        this.color = color;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Override
    public void eat(){
        System.out.println("是一个"+this.getGender()+"的"+this.getColor()+"兔子，今年"+this.getAge()
                +"岁了，非常喜爱吃草！");
    }
}
